]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Define promisify of g_query_info_async in the global scope
authorAndy Holmes <andrew.g.r.holmes@gmail.com>
Sun, 12 Feb 2023 21:46:07 +0000 (13:46 -0800)
committerMarge Bot <marge-bot@gnome.org>
Mon, 13 Feb 2023 00:01:08 +0000 (00:01 +0000)
This is something that will be used in other places outside the
background code, so let's just define it globally without having to care
about the importing order.

Co-authored-by: Marco Trevisan (TreviƱo) <mail@3v1n0.net>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2638>

js/ui/background.js
js/ui/environment.js

index 023b1823ed6893f90f0b52c989235ba3c2d20c96..cd97c89464983e457f485e557dc49329eb18d95e 100644 (file)
@@ -101,8 +101,6 @@ const LoginManager = imports.misc.loginManager;
 const Main = imports.ui.main;
 const Params = imports.misc.params;
 
-Gio._promisify(Gio.File.prototype, 'query_info_async');
-
 var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
 
 const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
index 5895031c66a2eb9681db38a36fa1325bc5536788..c2088c394cd5b67d3fbb7f72d85a59ea880a7e14 100644 (file)
@@ -55,6 +55,7 @@ Gio._promisify(Gio.DBusConnection.prototype, 'call');
 Gio._promisify(Gio.DBusProxy, 'new');
 Gio._promisify(Gio.DBusProxy.prototype, 'init_async');
 Gio._promisify(Gio.DBusProxy.prototype, 'call_with_unix_fd_list');
+Gio._promisify(Gio.File.prototype, 'query_info_async');
 Gio._promisify(Polkit.Permission, 'new');
 
 let _localTimeZone = null;